package org.statewalker.tokenizer.stream;

public class CharStream extends AbstractCharStream {

    private char[] fArray;

    private int fArrayPos;

    public CharStream(String str) {
        fArray = str.toCharArray();
        fArrayPos = 0;
    }

    @Override
    protected int readNext() {
        return fArrayPos < fArray.length ? fArray[fArrayPos++] : -1;
    }

}